#include "newfile.h"
#include "ui_newfile.h"


NewFile::NewFile(QWidget *parent) : QDialog(parent), ui(new Ui::NewFile)
{
	ui->setupUi(this);
}

NewFile::~NewFile()
{
	delete ui;
}

NewFile::DocumentType NewFile::getDocumentType() const
{
	if (ui->radioButton_textDocument->isChecked())
		return DOCUMENT_TEXT;

	else if (ui->radioButton_formattedDocument->isChecked())
		return DOCUMENT_FORMATTED;

	else
		return DOCUMENT_NONE;
}

void NewFile::changeEvent(QEvent *e)
{
	QDialog::changeEvent(e);

	switch (e->type())
	{
		case QEvent::LanguageChange:
			ui->retranslateUi(this);

			break;

		default:
			break;
	}
}
